package com.xb.cloud.product.search.service.client.bo;

public class SearchResultSKUBo {
	private String id;
	private String shopId;
	private String skuNameCn;

	private String skuTitleSub;
	private String price;
	private String unit;
	private String defaultPicURL;
	private String totalSaleAmount;
	private boolean showOriginalPrice;
	private String priceMarket;
	

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getShopId() {
		return shopId;
	}
	public void setShopId(String shopId) {
		this.shopId = shopId;
	}
	public String getSkuNameCn() {
		return skuNameCn;
	}
	public void setSkuNameCn(String skuNameCn) {
		this.skuNameCn = skuNameCn;
	}
	public String getSkuTitleSub() {
		return skuTitleSub;
	}
	public void setSkuTitleSub(String skuTitleSub) {
		this.skuTitleSub = skuTitleSub;
	}
	
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}
	public String getDefaultPicURL() {
		return defaultPicURL;
	}
	public void setDefaultPicURL(String defaultPicURL) {
		this.defaultPicURL = defaultPicURL;
	}
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getTotalSaleAmount() {
		return totalSaleAmount;
	}
	public void setTotalSaleAmount(String totalSaleAmount) {
		this.totalSaleAmount = totalSaleAmount;
	}
	public String getPriceMarket() {
		return priceMarket;
	}
	public void setPriceMarket(String priceMarket) {
		this.priceMarket = priceMarket;
	}
	public boolean isShowOriginalPrice() {
		double price_d;
		double priceMarket_d;
		try {
			if(price.isEmpty()) {
				return false;
			}
			price_d = Double.valueOf(price);
			if(priceMarket.isEmpty()) {
				return false;
			}
			priceMarket_d = Double.valueOf(priceMarket);
		} catch (Exception e) {
			return false;
		}
		if(priceMarket_d> price_d) {
			return true;
		}
		return false;
	}
	public void setShowOriginalPrice(boolean showOriginalPrice) {
		this.showOriginalPrice = showOriginalPrice;
	}
	
}
